* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    width: 100%;
    vertical-align: middle;
}

.box {
    width: 1110px;
    height: 247px;
    margin: 20px auto;
}

.box li {
    position: relative;
    float: left;
    width: 350px;
    height: 247px;
    margin-right: 30px;
    overflow: hidden;
    background-color: pink;
}

.box li:last-child {
    margin-right: 0;
}

.box .txt{
    position: absolute;
    top: 150px;
    left: 0;
    font-size: 14px;
    padding-left: 20px;
    padding-right: 40px;
}

.box .txt h5{
    color: #fff;
}

.box .txt p{
    color: #fff;
    font-size: 18px;
    margin-bottom: 40px;
}

.box .txt a{
    font-size: 16px;
    color: #fff;
}

.box  .iconfont {
    color: red;
    margin-left: 10px;
}
.box .mask{
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0),rgba(0, 0, 0, .42));
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
}
@keyframes boxAnimation {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-50px);  
    }
}

@keyframes maskAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.box li:nth-child(1):hover .txt {
    animation: boxAnimation 1s forwards alternate;
}
.box li:hover .mask{
    animation: maskAnimation 1s forwards;
}

.box  .txt2{
    position: absolute;
    top: 160px;
    left: 10px;
    font-size: 20px;
}

.box .txt2 h5{
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.box .txt2 p{
    color: #fff;
    font-size: 18px;
    margin-bottom: 30px;
}

.box .txt2 a{
    font-size: 16px;
    color: #fff;
}

@keyframes boxAnimation2 {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-45px);
    }
}

.box li:nth-child(2):hover .txt2 {
    animation: boxAnimation2 1s forwards alternate;
    
}

.box li:nth-child(3):hover .txt {
    animation: boxAnimation2 1s forwards alternate;
    
}







